-
-
Notifications
You must be signed in to change notification settings - Fork 398
[skip changelog] Fix core search tests #1049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b9c6b9c
to
3e07fbe
Compare
test/test_core.py
Outdated
assert ["Updating", "index:", "package_index.json", "downloaded"] in lines | ||
assert ["Updating", "index:", "package_index.json.sig", "downloaded"] in lines | ||
assert ["Retrokits-RK002:arm", "1.0.5", "RK002"] in lines | ||
assert ["Retrokits-RK002:arm", "1.0.6", "RK002"] in lines | ||
header_index = lines.index(["ID", "Version", "Name"]) | ||
assert 2 == len(lines[header_index + 1 :]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert 2 == len(lines[header_index + 1 :]) | |
assert 2 == len(lines[(header_index + 1):]) |
What do you think about doing this instead, and then leaving the E203
flake8 check intact? It seems easier to understand to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wouldn't work, black
would format it as lines[(header_index + 1) :]
so flake8
complains anyway.
3e07fbe
to
c8895d2
Compare
lines = [l.strip().split() for l in result.stdout.strip().splitlines()] | ||
assert ["Updating", "index:", "package_index.json", "downloaded"] in lines | ||
assert ["Updating", "index:", "package_index.json.sig", "downloaded"] in lines | ||
assert ["Package:x86", "1.2.3", "Platform"] in lines | ||
assert 1 == len(lines[header_index + 1 :]) # noqa: E203 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document what # noqa: E203
does. At least in the commit message. Thanks!
c8895d2
to
8408ef1
Compare
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
A small fix in the integration tests.
Tests might fail some times if indexes update is slower than usual.
Tests should not fail anymore if indexes update is slow.
No.
None.
See how to contribute